A portion of the disclosure of this patent document contains material, which is subject to copyright protection. The copyright owner has no objection to the reproduction by anyone of the patent document or the patent disclosure as it appears in the United States Patent and Trademark Office patent file or records, but otherwise reserves all copyright rights whatsoever.
1. Field of the Invention
The present invention is directed to technology for providing request based caching on a server.
2. Description of the Related Art
Identity Systems have become more popular with the growth of the Internet and the use of networks and other information technologies. In general, an Identity System provides for the creation, removal, editing and other management of identity information stored in various types of data stores. The identity information pertains to users, groups, organizations and/or things. For each entry in the data store, a set of attributes is stored. For example, the attributes stored for a user may include a name, address, employee number, telephone number, email address, user ID and password. The Identity System can also manage access privileges that govern the subject matter an entity can view, create, modify or use in the Identity System.
Identity System users direct the operation of the Identity System by submitting requests that call for an Identity System response, such a searching and viewing a user""s profile. Requests frequently require the Identity System to repeatedly access the same entries in the Identity System""s data store. For example, a request may cause the Identity System to load data into a data store entry and later retrieve the newly loaded data multiple times for performing different functions. This can occur when a client provides identification information that is stored in a data store entry. The request may retrieve this information on multiple occasions for forwarding to servers or applications accessed by the client request.
Accessing the same data store entries multiple times for a single request slows request processing and wastes data store bandwidth. It is desirable to reduce the number of times a data store entry is accessed in response to a single request.
The present invention, roughly described, reduces repeated accesses to the same data store entry by providing request based caching of data store entries.
Each client request is assigned to a thread of execution in an Identity Server within an Identity System. A cache object is associated with the thread of execution for caching data store entry accesses arising from the request. In one implementation, the thread of execution contains a thread local storage with a pointer to the cache object. Employing the cache object to maintain frequently accessed data store entries reduces the number of data store accesses required to service the requestxe2x80x94speeding request processing time and freeing data store bandwidth.
In one embodiment of the present invention, an Identity Server receiving a request interprets a command in the request to call for an access to a data store entry. In response to the command, the Identity Server accesses a first entry in the cache object that corresponds to the data store entry called for in the command. If the cache object does not include an entry corresponding to the data store entry, the Identity Server creates and loads a corresponding entry in the cache object.
If a data store access command calls for a value to be written to the data store entry, the Identity Server writes the value to both the cache object and the data store. This ensures that the data store is up to date for other threads of execution. When the Identity Server encounters a subsequent query command arising from the request for the same data store entry, the Identity Server only needs to retrieve the data written to the cache object. This allows the Identity Server to respond to the request with the most recent data without requiring a data store access.
The cache object is only accessible to the Identity Server responding to the request, and the cache object is not updated when other requests alter data store entries. In one instance, the cache object is not accessed in response to any other requests, and the cache object is destroyed once the Identity Server completes the response to the request.
In further embodiments of the present invention, request based caching is employed in processing environments other than an Identity System. Request based caching can have broad applicability to enhance the performance of many different server based systems.
The present invention can be accomplished using hardware, software, or a combination of both hardware and software. The software used for the present invention is stored on one or more processor readable storage media including hard disk drives, CD-ROMs, DVDs, optical disks, floppy disks, tape drives, RAM, ROM or other suitable storage devices. In alternative embodiments, some or all of the software can be replaced by dedicated hardware including custom integrated circuits, gate arrays, FPGAs, PLDs, and special purpose computers.
These and other objects and advantages of the present invention will appear more clearly from the following description in which the preferred embodiment of the invention has been set forth in conjunction with the drawings.